package wechat

import (
	"jlpay-sdk-go/pkg/jlpay/core"
	"jlpay-sdk-go/pkg/jlpay/models/openmerch/wechat"
	"jlpay-sdk-go/pkg/jlpay/services"
)

// WechatService 微信服务
type WechatService struct {
	*services.BaseService
}

// NewWechatService 创建微信服务实例
func NewWechatService(config *core.Config) *WechatService {
	return &WechatService{
		BaseService: services.NewBaseService(config),
	}
}

// QueryRealnameWx 查询微信实名认证
func (s *WechatService) QueryRealnameWx(request *wechat.RealnameWxQueryRequest) (*wechat.RealnameWxQueryResponse, error) {
	response := wechat.NewRealnameWxQueryResponse()
	err := s.Post(request, response, "/open/merch/access/wechat/realname/query")
	return response, err
}
